<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>WorkApp</title>
    <link rel="stylesheet" media="screen" href="/static/layui/css/layui.css">
    <style type="text/css">
    	.layui-icon{
        font-size: 18px;
        vertical-align: middle;
      }
    </style>
    <script src="/static/js/jquery-2.1.4.min.js"></script>
    <script src="/static/layui/layui.js"></script>
  </head>
	<body>
  	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-row" style="color: #c2c2c2;height: 100%;">
				<div class="layui-col-md3">
					<div class="grid-demo grid-demo-bg1">&nbsp;</div>
				</div>
				<div class="layui-col-md6" style="padding-top: 10px;">
					<div class="grid-demo">
						<h1 style="font-size: 30px;letter-spacing: 4px;text-align: center;">泵马达壳体内流场流动传热分析数据库软件</h1>
					</div>
				</div>
				<div class="layui-col-md3">
					<div class="grid-demo grid-demo-bg1">
						<ul class="layui-nav layui-layout-right">
							<li class="layui-nav-item layui-hide layui-show-sm-inline-block">
								<a href="javascript:;">
									<i class="layui-icon layui-icon-user"></i>
									{{.user}}
								</a>
								<dl class="layui-nav-child">
									<dd><a href="/logout">退出</a></dd>
								</dl>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<!-- <div class="layui-logo layui-bg-black" style="text-align:center;width: 100%;"><h1 class="text-center" style="color: #c2c2c2;font-size: 30px;letter-spacing: 4px">泵马达壳体内流场流动传热分析数据库软件</h1></div> -->
		</div>
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
			<ul class="layui-nav layui-nav-tree" lay-filter="test">
				<li class="layui-nav-item layui-nav-itemed">
				<a href="javascript:;"><i class="layui-icon layui-icon-app"></i> 功能菜单</a>
				<dl class="layui-nav-child">
					<dd><a lay-header-event="menuLeft" data-url="/index/Handinsert" mytitle="数据录入" href="javascript:;"><i class="layui-icon layui-icon-tabs"></i> 数据录入</a></dd>
					<dd><a lay-header-event="menuLeft" data-url="/loger/Querylog" mytitle="数据查询" href="javascript:;"><i class="layui-icon layui-icon-search"></i> 数据查询</a></dd>
					<dd><a lay-header-event="menuLeft" data-url="/system/SystemSettings" mytitle="系统设置" href="javascript:;"><i class="layui-icon layui-icon-set-fill"></i> 系统设置</a></dd>
				</dl>
				</li>
			</ul>
			</div>
		</div>
		<div class="layui-body">
			<div style="padding: 15px;">
				<div class="layui-tab layui-tab-card"  lay-filter="fluidobj" lay-allowclose="true">
					<ul class="layui-tab-title"></ul>
					<div class="layui-tab-content"></div>
				</div> 
			</div>
		</div>
		<div class="layui-footer" style="text-align:center;letter-spacing: 2px;">系统版本:version@2021~2023
		</div>
	</div>
	</body>
	<script>
		(function () {
			window.onload = function () {
				$(".layui-nav-child").find("a").eq(1).trigger('click');
			}
			layui.use(['element', 'util'], function () {
				var element = layui.element;
				var util = layui.util;
				var $ = layui.$;

				util.event('lay-header-event', {
					menuLeft: function (othis) {
						var arrayObj = new Array();
						$(".layui-tab-title").find('li').each(function () {
							var y = $(this).attr("lay-id");
							arrayObj.push(y);
						});
						title = othis.attr('mytitle')
						htmlurl = othis.attr('data-url');
						if ($.inArray(title, arrayObj) < 0) {
							element.tabAdd('fluidobj', {
								title: title
								, content: '<iframe style="width: 100%;height:45em;border-width:0px !important" src=' + htmlurl + ' ></iframe>'
								, id: title
							});
							element.tabChange('fluidobj', title);
							arrayObj.push(title);
						} else {
							element.tabChange('fluidobj', title);
						}
					},
				});
			});
		})()
	</script>
</html>
